﻿using System;
using ActivateYourGlutes.Model.Providers;
using Microsoft.Practices.ServiceLocation;

namespace ActivateYourGlutes.Model.Contracts
{
    public class Measurement
    {
        public int MeasurementId { get; set; }

        public double Value { get; set; }

        public MeasurementType MeasurementType { get; set; }

        public double LocalisedValue
        {
            get
            {
                return MeasurementType.LocaliseValue(Value);
            }
            set
            {
                Value = MeasurementType.DelocaliseValue(value);
            }
        }
    }
}